﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SoccerSimulator5000
{
    public partial class FixturesForm : Form
    {
        int index;
        public FixturesForm()
        {
            InitializeComponent();
        }

        public void FillRoundsList()
        {
            listBoxRounds.Items.Clear();
            for (int i = 0; i < Game.season.seasonFixtures.fixtures.Count(); i++)
            {
                listBoxRounds.Items.Add("Round " + (i + 1));
            }
            
        }

        private void listBoxRounds_SelectedIndexChanged(object sender, EventArgs e)
        {
            index = this.listBoxRounds.SelectedIndex;
            panel1.Invalidate();

        }


        private void panel1_Paint(object sender, PaintEventArgs e)
        {
            Game.season.seasonFixtures.fixtures[index].round[0].date.Draw(500, 50, e.Graphics);
                //.date.Draw(500, 50, e.Graphics);
            Game.season.seasonFixtures.fixtures[index].Draw(200, 200, e.Graphics);
        }
    }
}
